<template>
  <div>
    <div class="banner" @click="handleBannerClick">
      <img class="banner-img" src="https://imgs.qunarzz.com/vs_ceph_vs_tts/16eeec21-d967-475f-b6b8-3d13cda49d93.jpg_r_390x260x95_074afa5c.jpg" alt="">
      <div class="banner-info">
        <div class="banner-title">
          海网红酒店，无限游玩水族馆+水世界
        </div>
        <div class="banner-number">
          <span class="iconfont icontupianimgyulan banner-icon"></span>39
        </div>
      </div>
    </div>
    <fade-animation>
      <common-gallary @close = "handleGallaryClose" v-show="showGallary" :imgs = "imgs"></common-gallary>
    </fade-animation>
  </div>
</template>
<script>
  import commonGallary from 'common/gallary/Gallary'
  import FadeAnimation from 'common/fade/FadeAnimation'
  export default {
    name: 'CommonGallary',
    components:{
      commonGallary,
      FadeAnimation
    },
    data(){
      return {
        showGallary: false,
        imgs : [
          'https://imgs.qunarzz.com/vs_ceph_vs_tts/16eeec21-d967-475f-b6b8-3d13cda49d93.jpg_r_390x260x95_074afa5c.jpg',
          'http://img1.qunarzz.com/sight/p0/1505/d2/d274c92de14c93da.water.jpg_710x360_a1f86ab7.jpg'
        ]
      }
    },
    methods: {
      handleBannerClick(){
        this.showGallary = true
      },
      handleGallaryClose(){
        this.showGallary = false
      }
    }
  }
</script>

<style lang="stylus" scoped>
  .banner
    position relative
    overflow hidden
    height 0
    padding-bottom 55%
    .banner-img
      width 100%
    .banner-info
      display flex
      position absolute
      left 0
      right 0
      bottom 0
      background-image linear-gradient(top ,rgba( 0,0,0,0),rgba(0,0,0,0.8))
      line-height .6rem
      color #ffffff
      .banner-title
        flex 1
        font-size .32rem
        padding 0 .2rem
      .banner-number
        height .32rem
        line-height .32rem
        margin-top 2px
        padding .1rem .2rem
       .banner-icon
        margin-right 2px

</style>